

#import "TextViewCell.h"


@implementation TextViewCell

@synthesize view;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self)
	{
		// turn off selection use
		self.selectionStyle = UITableViewCellSelectionStyleNone;
	}
	return self;
}

- (void)setView:(UITextView *)inView
{
	view = inView;
	[self.view retain];
	[self.contentView addSubview:inView];
	[self layoutSubviews];
}

- (void)layoutSubviews
{
	[super layoutSubviews];
	
	CGRect contentRect = [self.contentView bounds];
	self.view.frame  = CGRectMake(contentRect.origin.x ,
									  contentRect.origin.y ,
									  contentRect.size.width ,
									  contentRect.size.height);

}

- (void)dealloc
{
    [view release];
    [super dealloc];
}

@end
